import request from '@/router/axios';

/**
 *@param data 新增保存接口
 * */
export const addInterface = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/save',
        method: 'post',
        data
    })
}
/**
 * @param params 查询接口列表
 * */
export const getInterface = (params) => {
    return request({
        url: '/api/manager-api/mx-interface/page',
        method: 'get',
        params
    })
}

/**
 *@param data 更新单个接口信息
 * */
export const updateInterface = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/update',
        method: 'post',
        data
    })
}

/**
 *@param data 删除接口信息
 * */
export const delInterface = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/delete',
        method: 'post',
        params: data
    })
}

/**
 *@param data 删除接口信息
 * */
export const startUse = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/startUsing',
        method: 'post',
        params: data
    })
}

/**
 *@param data 删除接口信息
 * */
export const stopUse = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/stopUsing',
        method: 'post',
        params: data
    })
}

/**
 *@param data 检出
 * */
export const checkout = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/checkout',
        method: 'post',
        params: data
    })
}

/**
 *@param data 撤销检出
 * */
export const revokeCheckout = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/revokeCheckout',
        method: 'post',
        params: data
    })
}

/**
 *@param data 检入
 * */
export const publish = (data) => {
    return request({
        url: '/api/manager-api/mx-interface/publish',
        method: 'post',
        params: data
    })
}

/**
 *@param params 获取详情
 * */
export const getDetail = (params) => {
    return request({
        url: '/api/manager-api/mx-interface/getById',
        method: 'get',
        params: params
    })
}

/**
 *@param params 获取父类型的所有功能接口
 * */
export const getFather = (params) => {
    return request({
        url: '/api/manager-api/mx-interface/latestReleaseListIncludedBaseObject',
        method: 'get',
        params: params
    })
}

/**
 *@param params 获取功能接口历史
 * */
export const historyList = (params) => {
    return request({
        url: '/api/manager-api/mx-interface/historyList',
        method: 'get',
        params: params
    })
}
